<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateShopOrderGoodsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        // 订单商品表
        Schema::create('shop_order_goods', function (Blueprint $table) {
            $table->increments('id',11)->comment('自增id');
            $table->integer('order_id')->comment('订单id');
            $table->integer('goods_id')->comment('商品id');
            $table->string('img',255)->comment('图片');
            $table->string('goods_price',50)->comment('商品原价');
            $table->string('real_price',50)->comment('实付金额');
            $table->integer('goods_num')->comment('数量');
            $table->string('goods_value',200)->comment('商品属性');
            $table->tinyInteger('is_send')->comment('是否发货');
            $table->integer('seller_id')->comment('商家id');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('shop_order_goods');
    }
}
